home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 414_02 / portable / intrflus.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-17  |  1.6 KB  |  66 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3. #undef    intrflush
  4.  
  5. #ifdef PDCDEBUG
  6. char *rcsid_intrflus = "$Header: C:\CURSES\portable\RCS\intrflus.c 2.1 1993/06/18 20:20:11 MH Rel MH $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   intrflush()    - enable flush on interrupt
  15.  
  16.   X/Open Description:
  17.      If this option is enabled (bf is TRUE), and an interrupt is
  18.      pressed on the keyboard (INTR, BREAK, or QUIT) all output in
  19.      the terminal driver queue will be flushed, giving the effect
  20.      of faster response to the interrupt but causing curses to have
  21.      the wrong idea of what is on the screen.  Disabling the option
  22.      prevents the flush.  The default for the option is inherited
  23.      from the terminal driver settings.  The window argument is
  24.      ignored.
  25.  
  26.   PDCurses Description:
  27.      No additional functionality.
  28.  
  29.   X/Open Return Value:
  30.      The intrflush() function returns OK on success and ERR on error.
  31.  
  32.   X/Open Errors:
  33.      No errors are defined for this function.
  34.  
  35.   Portability:
  36.      PDCurses    int intrflush( WINDOW* win, bool bf );
  37.      X/Open Dec '88    int intrflush( WINDOW* win, bool bf );
  38.      BSD Curses    
  39.      SYS V Curses    
  40.  
  41. **man-end**********************************************************************/
  42.  
  43. int    intrflush( WINDOW *win, bool bf )
  44. {
  45. #ifdef    TC
  46. #  pragma argsused
  47. #endif
  48.     int    y;
  49.     int    maxy;
  50.  
  51. #ifdef PDCDEBUG
  52.     if (trace_on) PDC_debug("intrflush() - called\n");
  53. #endif
  54.  
  55.     if (win == (WINDOW *)NULL)
  56.         return( ERR );
  57.  
  58.     maxy = win->_maxy - 1;
  59.  
  60.     for (y = 0; y <= maxy; y++)
  61.     {
  62.         win->_firstch[y] = _NO_CHANGE;
  63.     }
  64.     return( OK );
  65. }
  66.